package com.janushuang.designpattern.abstractfactory;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author zhijing.huang
 *         Created by zhijing.huang on 2014/9/28.
 */
public class Client {
    private static final Logger LOGGER = LoggerFactory.getLogger(Client.class);
    public static void createSerial1() {
        LOGGER.info("Creating Serial 1 products");
        ProductA productA = new ConcreteFactory1().createProductA();
        ProductB productB = new ConcreteFactory1().createProductB();
        LOGGER.info(String.format("productA=%s,productB=%s",productA,productB));
    }

    public static void createSerial2() {
        LOGGER.info("Creating Serial 2 products");
        ProductA productA = new ConcreteFactory2().createProductA();
        ProductB productB = new ConcreteFactory2().createProductB();
        LOGGER.info(String.format("productA=%s,productB=%s",productA,productB));
    }
}
